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.
Files changed (215) hide show
  1. package/CHANGELOG.md +446 -0
  2. package/LICENSE +21 -0
  3. package/README.md +75 -0
  4. package/ai-path/ADMIN-ELEVATION.md +116 -0
  5. package/ai-path/AI-MANIFESTO.md +185 -0
  6. package/ai-path/BREAKING.md +74 -0
  7. package/ai-path/CHECKLIST.md +619 -0
  8. package/ai-path/CONNECTION-STEPS.md +724 -0
  9. package/ai-path/DECISION-TREE.md +378 -0
  10. package/ai-path/DEPENDENCIES.md +459 -0
  11. package/ai-path/E2E-FLOW.md +1555 -0
  12. package/ai-path/FAILURES.md +403 -0
  13. package/ai-path/GUIDE.md +1217 -0
  14. package/ai-path/README.md +558 -0
  15. package/ai-path/SPLIT-TUNNEL.md +266 -0
  16. package/ai-path/cli.js +535 -0
  17. package/ai-path/connect.js +884 -0
  18. package/ai-path/discover.js +178 -0
  19. package/ai-path/environment.js +266 -0
  20. package/ai-path/errors.js +86 -0
  21. package/ai-path/examples/autonomous-agent.mjs +220 -0
  22. package/ai-path/examples/multi-region.mjs +174 -0
  23. package/ai-path/examples/one-shot.mjs +31 -0
  24. package/ai-path/index.js +60 -0
  25. package/ai-path/pricing.js +136 -0
  26. package/ai-path/recommend.js +413 -0
  27. package/ai-path/run-admin.vbs +25 -0
  28. package/ai-path/setup.js +291 -0
  29. package/ai-path/wallet.js +137 -0
  30. package/app-helpers.js +363 -0
  31. package/app-settings.js +95 -0
  32. package/app-types.js +267 -0
  33. package/audit.js +847 -0
  34. package/batch.js +293 -0
  35. package/bin/setup.js +376 -0
  36. package/chain/authz.js +109 -0
  37. package/chain/broadcast.js +472 -0
  38. package/chain/client.js +160 -0
  39. package/chain/fee-grants.js +305 -0
  40. package/chain/index.js +891 -0
  41. package/chain/lcd.js +313 -0
  42. package/chain/queries.js +547 -0
  43. package/chain/rpc.js +408 -0
  44. package/chain/wallet.js +141 -0
  45. package/cli/config.js +143 -0
  46. package/cli/index.js +463 -0
  47. package/cli/output.js +182 -0
  48. package/cli.js +491 -0
  49. package/client/index.js +251 -0
  50. package/client.js +271 -0
  51. package/config/index.js +255 -0
  52. package/connection/connect.js +849 -0
  53. package/connection/disconnect.js +180 -0
  54. package/connection/discovery.js +321 -0
  55. package/connection/index.js +76 -0
  56. package/connection/proxy.js +148 -0
  57. package/connection/resilience.js +428 -0
  58. package/connection/security.js +232 -0
  59. package/connection/state.js +369 -0
  60. package/connection/tunnel.js +691 -0
  61. package/consumer.js +132 -0
  62. package/cosmjs-setup.js +1884 -0
  63. package/defaults.js +366 -0
  64. package/disk-cache.js +107 -0
  65. package/dist/client.d.ts +108 -0
  66. package/dist/client.d.ts.map +1 -0
  67. package/dist/client.js +400 -0
  68. package/dist/client.js.map +1 -0
  69. package/dist/index.d.ts +8 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +8 -0
  72. package/dist/index.js.map +1 -0
  73. package/errors/index.js +112 -0
  74. package/errors.js +218 -0
  75. package/examples/README.md +64 -0
  76. package/examples/connect-direct.mjs +106 -0
  77. package/examples/connect-plan.mjs +125 -0
  78. package/examples/error-handling.mjs +109 -0
  79. package/examples/query-nodes.mjs +94 -0
  80. package/examples/wallet-basics.mjs +61 -0
  81. package/generated/amino/amino.ts +9 -0
  82. package/generated/cosmos/base/v1beta1/coin.ts +365 -0
  83. package/generated/cosmos_proto/cosmos.ts +323 -0
  84. package/generated/gogoproto/gogo.ts +9 -0
  85. package/generated/google/protobuf/descriptor.ts +7601 -0
  86. package/generated/google/protobuf/duration.ts +208 -0
  87. package/generated/google/protobuf/timestamp.ts +238 -0
  88. package/generated/sentinel/lease/v1/events.ts +924 -0
  89. package/generated/sentinel/lease/v1/lease.ts +292 -0
  90. package/generated/sentinel/lease/v1/msg.ts +949 -0
  91. package/generated/sentinel/lease/v1/params.ts +164 -0
  92. package/generated/sentinel/node/v3/events.ts +881 -0
  93. package/generated/sentinel/node/v3/msg.ts +1002 -0
  94. package/generated/sentinel/node/v3/node.ts +263 -0
  95. package/generated/sentinel/node/v3/params.ts +183 -0
  96. package/generated/sentinel/plan/v3/events.ts +675 -0
  97. package/generated/sentinel/plan/v3/msg.ts +1191 -0
  98. package/generated/sentinel/plan/v3/plan.ts +283 -0
  99. package/generated/sentinel/provider/v2/events.ts +171 -0
  100. package/generated/sentinel/provider/v2/msg.ts +480 -0
  101. package/generated/sentinel/provider/v2/params.ts +131 -0
  102. package/generated/sentinel/provider/v2/provider.ts +246 -0
  103. package/generated/sentinel/session/v3/events.ts +480 -0
  104. package/generated/sentinel/session/v3/msg.ts +616 -0
  105. package/generated/sentinel/session/v3/params.ts +260 -0
  106. package/generated/sentinel/session/v3/proof.ts +180 -0
  107. package/generated/sentinel/session/v3/session.ts +384 -0
  108. package/generated/sentinel/subscription/v3/events.ts +1181 -0
  109. package/generated/sentinel/subscription/v3/msg.ts +1305 -0
  110. package/generated/sentinel/subscription/v3/params.ts +167 -0
  111. package/generated/sentinel/subscription/v3/subscription.ts +315 -0
  112. package/generated/sentinel/types/v1/bandwidth.ts +124 -0
  113. package/generated/sentinel/types/v1/price.ts +149 -0
  114. package/generated/sentinel/types/v1/renewal.ts +87 -0
  115. package/generated/sentinel/types/v1/status.ts +54 -0
  116. package/generated/typeRegistry.ts +27 -0
  117. package/index.js +486 -0
  118. package/node-connect.js +3015 -0
  119. package/operator.js +134 -0
  120. package/package.json +113 -0
  121. package/plan-operations.js +199 -0
  122. package/preflight.js +352 -0
  123. package/pricing/index.js +262 -0
  124. package/proto/amino/amino.proto +84 -0
  125. package/proto/cosmos/base/v1beta1/coin.proto +61 -0
  126. package/proto/cosmos_proto/cosmos.proto +112 -0
  127. package/proto/gogoproto/gogo.proto +145 -0
  128. package/proto/google/api/annotations.proto +31 -0
  129. package/proto/google/api/http.proto +370 -0
  130. package/proto/google/protobuf/any.proto +106 -0
  131. package/proto/google/protobuf/duration.proto +115 -0
  132. package/proto/google/protobuf/timestamp.proto +145 -0
  133. package/proto/sentinel/lease/v1/events.proto +52 -0
  134. package/proto/sentinel/lease/v1/genesis.proto +15 -0
  135. package/proto/sentinel/lease/v1/lease.proto +25 -0
  136. package/proto/sentinel/lease/v1/msg.proto +62 -0
  137. package/proto/sentinel/lease/v1/params.proto +17 -0
  138. package/proto/sentinel/node/v3/events.proto +50 -0
  139. package/proto/sentinel/node/v3/genesis.proto +15 -0
  140. package/proto/sentinel/node/v3/msg.proto +63 -0
  141. package/proto/sentinel/node/v3/node.proto +27 -0
  142. package/proto/sentinel/node/v3/params.proto +21 -0
  143. package/proto/sentinel/node/v3/querier.proto +63 -0
  144. package/proto/sentinel/plan/v3/events.proto +41 -0
  145. package/proto/sentinel/plan/v3/genesis.proto +21 -0
  146. package/proto/sentinel/plan/v3/msg.proto +83 -0
  147. package/proto/sentinel/plan/v3/plan.proto +32 -0
  148. package/proto/sentinel/plan/v3/querier.proto +53 -0
  149. package/proto/sentinel/provider/v2/events.proto +16 -0
  150. package/proto/sentinel/provider/v2/genesis.proto +15 -0
  151. package/proto/sentinel/provider/v2/msg.proto +35 -0
  152. package/proto/sentinel/provider/v2/params.proto +17 -0
  153. package/proto/sentinel/provider/v2/provider.proto +24 -0
  154. package/proto/sentinel/provider/v3/genesis.proto +15 -0
  155. package/proto/sentinel/provider/v3/params.proto +13 -0
  156. package/proto/sentinel/session/v3/events.proto +30 -0
  157. package/proto/sentinel/session/v3/genesis.proto +15 -0
  158. package/proto/sentinel/session/v3/msg.proto +50 -0
  159. package/proto/sentinel/session/v3/params.proto +25 -0
  160. package/proto/sentinel/session/v3/proof.proto +25 -0
  161. package/proto/sentinel/session/v3/querier.proto +100 -0
  162. package/proto/sentinel/session/v3/session.proto +50 -0
  163. package/proto/sentinel/subscription/v2/allocation.proto +21 -0
  164. package/proto/sentinel/subscription/v2/payout.proto +22 -0
  165. package/proto/sentinel/subscription/v3/events.proto +65 -0
  166. package/proto/sentinel/subscription/v3/genesis.proto +17 -0
  167. package/proto/sentinel/subscription/v3/msg.proto +83 -0
  168. package/proto/sentinel/subscription/v3/params.proto +21 -0
  169. package/proto/sentinel/subscription/v3/subscription.proto +33 -0
  170. package/proto/sentinel/types/v1/bandwidth.proto +19 -0
  171. package/proto/sentinel/types/v1/price.proto +21 -0
  172. package/proto/sentinel/types/v1/renewal.proto +21 -0
  173. package/proto/sentinel/types/v1/status.proto +16 -0
  174. package/protocol/encoding.js +341 -0
  175. package/protocol/events.js +361 -0
  176. package/protocol/handshake.js +297 -0
  177. package/protocol/index.js +15 -0
  178. package/protocol/messages.js +346 -0
  179. package/protocol/plans.js +199 -0
  180. package/protocol/v2ray.js +268 -0
  181. package/protocol/v3.js +723 -0
  182. package/protocol/wireguard.js +125 -0
  183. package/security/index.js +132 -0
  184. package/session-manager.js +329 -0
  185. package/session-tracker.js +80 -0
  186. package/setup.js +376 -0
  187. package/speedtest/index.js +528 -0
  188. package/speedtest.js +567 -0
  189. package/src/client.ts +502 -0
  190. package/src/index.ts +20 -0
  191. package/state/index.js +347 -0
  192. package/state.js +516 -0
  193. package/test-all-chain-ops.js +493 -0
  194. package/test-all-logic.js +199 -0
  195. package/test-all-msg-types.js +292 -0
  196. package/test-every-connection.js +208 -0
  197. package/test-feegrant-connect.js +98 -0
  198. package/test-logic.js +148 -0
  199. package/test-mainnet.js +176 -0
  200. package/test-plan-lifecycle.js +335 -0
  201. package/tls-trust.js +132 -0
  202. package/tsconfig.build.json +20 -0
  203. package/tsconfig.json +34 -0
  204. package/types/chain.d.ts +746 -0
  205. package/types/connection.d.ts +425 -0
  206. package/types/errors.d.ts +174 -0
  207. package/types/index.d.ts +1380 -0
  208. package/types/nodes.d.ts +187 -0
  209. package/types/pricing.d.ts +156 -0
  210. package/types/protocol.d.ts +332 -0
  211. package/types/session.d.ts +236 -0
  212. package/types/settings.d.ts +192 -0
  213. package/v3protocol.js +1053 -0
  214. package/wallet/index.js +153 -0
  215. package/wireguard.js +307 -0
@@ -0,0 +1,145 @@
1
+ // Protocol Buffers - Google's data interchange format
2
+ // Copyright 2008 Google Inc. All rights reserved.
3
+ // https://developers.google.com/protocol-buffers/
4
+ //
5
+ // Redistribution and use in source and binary forms, with or without
6
+ // modification, are permitted provided that the following conditions are
7
+ // met:
8
+ //
9
+ // * Redistributions of source code must retain the above copyright
10
+ // notice, this list of conditions and the following disclaimer.
11
+ // * Redistributions in binary form must reproduce the above
12
+ // copyright notice, this list of conditions and the following disclaimer
13
+ // in the documentation and/or other materials provided with the
14
+ // distribution.
15
+ // * Neither the name of Google Inc. nor the names of its
16
+ // contributors may be used to endorse or promote products derived from
17
+ // this software without specific prior written permission.
18
+ //
19
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ syntax = "proto3";
32
+
33
+ package google.protobuf;
34
+
35
+ option cc_enable_arenas = true;
36
+ option go_package = "google.golang.org/protobuf/types/known/timestamppb";
37
+ option java_package = "com.google.protobuf";
38
+ option java_outer_classname = "TimestampProto";
39
+ option java_multiple_files = true;
40
+ option objc_class_prefix = "GPB";
41
+ option csharp_namespace = "Google.Protobuf.WellKnownTypes";
42
+
43
+ // A Timestamp represents a point in time independent of any time zone or local
44
+ // calendar, encoded as a count of seconds and fractions of seconds at
45
+ // nanosecond resolution. The count is relative to an epoch at UTC midnight on
46
+ // January 1, 1970, in the proleptic Gregorian calendar which extends the
47
+ // Gregorian calendar backwards to year one.
48
+ //
49
+ // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
50
+ // second table is needed for interpretation, using a [24-hour linear
51
+ // smear](https://developers.google.com/time/smear).
52
+ //
53
+ // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
54
+ // restricting to that range, we ensure that we can convert to and from [RFC
55
+ // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
56
+ //
57
+ // # Examples
58
+ //
59
+ // Example 1: Compute Timestamp from POSIX `time()`.
60
+ //
61
+ // Timestamp timestamp;
62
+ // timestamp.set_seconds(time(NULL));
63
+ // timestamp.set_nanos(0);
64
+ //
65
+ // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
66
+ //
67
+ // struct timeval tv;
68
+ // gettimeofday(&tv, NULL);
69
+ //
70
+ // Timestamp timestamp;
71
+ // timestamp.set_seconds(tv.tv_sec);
72
+ // timestamp.set_nanos(tv.tv_usec * 1000);
73
+ //
74
+ // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
75
+ //
76
+ // FILETIME ft;
77
+ // GetSystemTimeAsFileTime(&ft);
78
+ // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
79
+ //
80
+ // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
81
+ // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
82
+ // Timestamp timestamp;
83
+ // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
84
+ // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
85
+ //
86
+ // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
87
+ //
88
+ // long millis = System.currentTimeMillis();
89
+ //
90
+ // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
91
+ // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
+ //
93
+ // Example 5: Compute Timestamp from Java `Instant.now()`.
94
+ //
95
+ // Instant now = Instant.now();
96
+ //
97
+ // Timestamp timestamp =
98
+ // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
99
+ // .setNanos(now.getNano()).build();
100
+ //
101
+ // Example 6: Compute Timestamp from current time in Python.
102
+ //
103
+ // timestamp = Timestamp()
104
+ // timestamp.GetCurrentTime()
105
+ //
106
+ // # JSON Mapping
107
+ //
108
+ // In JSON format, the Timestamp type is encoded as a string in the
109
+ // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
110
+ // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
111
+ // where {year} is always expressed using four digits while {month}, {day},
112
+ // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
113
+ // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
114
+ // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
115
+ // is required. A ProtoJSON serializer should always use UTC (as indicated by
116
+ // "Z") when printing the Timestamp type and a ProtoJSON parser should be
117
+ // able to accept both UTC and other timezones (as indicated by an offset).
118
+ //
119
+ // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
120
+ // 01:30 UTC on January 15, 2017.
121
+ //
122
+ // In JavaScript, one can convert a Date object to this format using the
123
+ // standard
124
+ // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
125
+ // method. In Python, a standard `datetime.datetime` object can be converted
126
+ // to this format using
127
+ // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
128
+ // the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
129
+ // the Joda Time's [`ISODateTimeFormat.dateTime()`](
130
+ // http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
131
+ // ) to obtain a formatter capable of generating timestamps in this format.
132
+ //
133
+ message Timestamp {
134
+ // Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
135
+ // be between -62135596800 and 253402300799 inclusive (which corresponds to
136
+ // 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
137
+ int64 seconds = 1;
138
+
139
+ // Non-negative fractions of a second at nanosecond resolution. This field is
140
+ // the nanosecond portion of the duration, not an alternative to seconds.
141
+ // Negative second values with fractions must still have non-negative nanos
142
+ // values that count forward in time. Must be between 0 and 999,999,999
143
+ // inclusive.
144
+ int32 nanos = 2;
145
+ }
@@ -0,0 +1,52 @@
1
+ syntax = "proto3";
2
+ package sentinel.lease.v1;
3
+
4
+ import "gogoproto/gogo.proto";
5
+
6
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/lease/types/v1";
7
+ option (gogoproto.equal_all) = false;
8
+ option (gogoproto.goproto_getters_all) = false;
9
+
10
+ message EventCreate {
11
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
12
+ string node_address = 2;
13
+ string prov_address = 3;
14
+ int64 max_hours = 4;
15
+ string price = 5;
16
+ string renewal_price_policy = 6;
17
+ }
18
+
19
+ message EventEnd {
20
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
21
+ string node_address = 2;
22
+ string prov_address = 3;
23
+ }
24
+
25
+ message EventPay {
26
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
27
+ string node_address = 2;
28
+ string prov_address = 3;
29
+ string payment = 4;
30
+ string staking_reward = 5;
31
+ }
32
+
33
+ message EventRefund {
34
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
35
+ string prov_address = 2;
36
+ string value = 3;
37
+ }
38
+
39
+ message EventRenew {
40
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
41
+ string node_address = 2;
42
+ string prov_address = 3;
43
+ int64 max_hours = 4;
44
+ string price = 5;
45
+ }
46
+
47
+ message EventUpdateDetails {
48
+ uint64 lease_id = 1 [(gogoproto.customname) = "LeaseID"];
49
+ string node_address = 2;
50
+ string prov_address = 3;
51
+ string renewal_price_policy = 4;
52
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+ package sentinel.lease.v1;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "sentinel/lease/v1/lease.proto";
6
+ import "sentinel/lease/v1/params.proto";
7
+
8
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/lease/types/v1";
9
+ option (gogoproto.equal_all) = false;
10
+ option (gogoproto.goproto_getters_all) = false;
11
+
12
+ message GenesisState {
13
+ repeated Lease leases = 1 [(gogoproto.nullable) = false];
14
+ Params params = 2 [(gogoproto.nullable) = false];
15
+ }
@@ -0,0 +1,25 @@
1
+ syntax = "proto3";
2
+ package sentinel.lease.v1;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "google/protobuf/timestamp.proto";
6
+ import "sentinel/types/v1/price.proto";
7
+ import "sentinel/types/v1/renewal.proto";
8
+
9
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/lease/types/v1";
10
+ option (gogoproto.equal_all) = false;
11
+ option (gogoproto.goproto_getters_all) = false;
12
+
13
+ message Lease {
14
+ uint64 id = 1 [(gogoproto.customname) = "ID"];
15
+ string prov_address = 2;
16
+ string node_address = 3;
17
+ sentinel.types.v1.Price price = 4 [(gogoproto.nullable) = false];
18
+ int64 hours = 5;
19
+ int64 max_hours = 6;
20
+ sentinel.types.v1.RenewalPricePolicy renewal_price_policy = 7;
21
+ google.protobuf.Timestamp start_at = 8 [
22
+ (gogoproto.nullable) = false,
23
+ (gogoproto.stdtime) = true
24
+ ];
25
+ }
@@ -0,0 +1,62 @@
1
+ syntax = "proto3";
2
+ package sentinel.lease.v1;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "sentinel/lease/v1/params.proto";
6
+ import "sentinel/types/v1/price.proto";
7
+ import "sentinel/types/v1/renewal.proto";
8
+
9
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/lease/types/v1";
10
+ option (gogoproto.equal_all) = false;
11
+ option (gogoproto.goproto_getters_all) = false;
12
+
13
+ message MsgEndLeaseRequest {
14
+ string from = 1;
15
+ uint64 id = 2 [(gogoproto.customname) = "ID"];
16
+ }
17
+
18
+ message MsgRenewLeaseRequest {
19
+ string from = 1;
20
+ uint64 id = 2 [(gogoproto.customname) = "ID"];
21
+ int64 hours = 3;
22
+ sentinel.types.v1.Price max_price = 4 [(gogoproto.nullable) = false];
23
+ }
24
+
25
+ message MsgStartLeaseRequest {
26
+ string from = 1;
27
+ string node_address = 2;
28
+ int64 hours = 3;
29
+ sentinel.types.v1.Price max_price = 4 [(gogoproto.nullable) = false];
30
+ sentinel.types.v1.RenewalPricePolicy renewal_price_policy = 5;
31
+ }
32
+
33
+ message MsgUpdateLeaseRequest {
34
+ string from = 1;
35
+ uint64 id = 2 [(gogoproto.customname) = "ID"];
36
+ sentinel.types.v1.RenewalPricePolicy renewal_price_policy = 3;
37
+ }
38
+
39
+ message MsgUpdateParamsRequest {
40
+ string from = 1;
41
+ Params params = 2 [(gogoproto.nullable) = false];
42
+ }
43
+
44
+ message MsgEndLeaseResponse {}
45
+
46
+ message MsgRenewLeaseResponse {}
47
+
48
+ message MsgStartLeaseResponse {
49
+ uint64 id = 1 [(gogoproto.customname) = "ID"];
50
+ }
51
+
52
+ message MsgUpdateLeaseResponse {}
53
+
54
+ message MsgUpdateParamsResponse {}
55
+
56
+ service MsgService {
57
+ rpc MsgEndLease(MsgEndLeaseRequest) returns (MsgEndLeaseResponse);
58
+ rpc MsgRenewLease(MsgRenewLeaseRequest) returns (MsgRenewLeaseResponse);
59
+ rpc MsgStartLease(MsgStartLeaseRequest) returns (MsgStartLeaseResponse);
60
+ rpc MsgUpdateLease(MsgUpdateLeaseRequest) returns (MsgUpdateLeaseResponse);
61
+ rpc MsgUpdateParams(MsgUpdateParamsRequest) returns (MsgUpdateParamsResponse);
62
+ }
@@ -0,0 +1,17 @@
1
+ syntax = "proto3";
2
+ package sentinel.lease.v1;
3
+
4
+ import "gogoproto/gogo.proto";
5
+
6
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/lease/types/v1";
7
+ option (gogoproto.equal_all) = false;
8
+ option (gogoproto.goproto_getters_all) = false;
9
+
10
+ message Params {
11
+ int64 max_hours = 1;
12
+ int64 min_hours = 2;
13
+ string staking_share = 3 [
14
+ (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
15
+ (gogoproto.nullable) = false
16
+ ];
17
+ }
@@ -0,0 +1,50 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+
6
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
7
+ option (gogoproto.equal_all) = false;
8
+ option (gogoproto.goproto_getters_all) = false;
9
+
10
+ message EventCreate {
11
+ string node_address = 1;
12
+ string gigabyte_prices = 2;
13
+ string hourly_prices = 3;
14
+ repeated string remote_addrs = 4;
15
+ }
16
+
17
+ message EventPay {
18
+ uint64 session_id = 1 [(gogoproto.customname) = "SessionID"];
19
+ string acc_address = 2;
20
+ string node_address = 3;
21
+ string payment = 4;
22
+ string staking_reward = 5;
23
+ }
24
+
25
+ message EventRefund {
26
+ uint64 session_id = 1 [(gogoproto.customname) = "SessionID"];
27
+ string acc_address = 2;
28
+ string value = 3;
29
+ }
30
+
31
+ message EventUpdateDetails {
32
+ string node_address = 1;
33
+ string gigabyte_prices = 2;
34
+ string hourly_prices = 3;
35
+ repeated string remote_addrs = 4;
36
+ }
37
+
38
+ message EventUpdateStatus {
39
+ string node_address = 1;
40
+ string status = 2;
41
+ }
42
+
43
+ message EventCreateSession {
44
+ uint64 session_id = 1 [(gogoproto.customname) = "SessionID"];
45
+ string acc_address = 2;
46
+ string node_address = 3;
47
+ string price = 4;
48
+ string max_bytes = 5;
49
+ string max_duration = 6;
50
+ }
@@ -0,0 +1,15 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "sentinel/node/v3/node.proto";
6
+ import "sentinel/node/v3/params.proto";
7
+
8
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
9
+ option (gogoproto.equal_all) = false;
10
+ option (gogoproto.goproto_getters_all) = false;
11
+
12
+ message GenesisState {
13
+ repeated sentinel.node.v3.Node nodes = 1 [(gogoproto.nullable) = false];
14
+ Params params = 3 [(gogoproto.nullable) = false];
15
+ }
@@ -0,0 +1,63 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "sentinel/node/v3/params.proto";
6
+ import "sentinel/types/v1/price.proto";
7
+ import "sentinel/types/v1/status.proto";
8
+
9
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
10
+ option (gogoproto.equal_all) = false;
11
+ option (gogoproto.goproto_getters_all) = false;
12
+
13
+ message MsgRegisterNodeRequest {
14
+ string from = 1;
15
+ repeated sentinel.types.v1.Price gigabyte_prices = 2 [(gogoproto.nullable) = false];
16
+ repeated sentinel.types.v1.Price hourly_prices = 3 [(gogoproto.nullable) = false];
17
+ repeated string remote_addrs = 4;
18
+ }
19
+
20
+ message MsgUpdateNodeDetailsRequest {
21
+ string from = 1;
22
+ repeated sentinel.types.v1.Price gigabyte_prices = 2 [(gogoproto.nullable) = false];
23
+ repeated sentinel.types.v1.Price hourly_prices = 3 [(gogoproto.nullable) = false];
24
+ repeated string remote_addrs = 4;
25
+ }
26
+
27
+ message MsgUpdateNodeStatusRequest {
28
+ string from = 1;
29
+ sentinel.types.v1.Status status = 2;
30
+ }
31
+
32
+ message MsgStartSessionRequest {
33
+ string from = 1;
34
+ string node_address = 2;
35
+ int64 gigabytes = 3;
36
+ int64 hours = 4;
37
+ sentinel.types.v1.Price max_price = 5 [(gogoproto.nullable) = false];
38
+ }
39
+
40
+ message MsgUpdateParamsRequest {
41
+ string from = 1;
42
+ Params params = 2 [(gogoproto.nullable) = false];
43
+ }
44
+
45
+ message MsgRegisterNodeResponse {}
46
+
47
+ message MsgUpdateNodeDetailsResponse {}
48
+
49
+ message MsgUpdateNodeStatusResponse {}
50
+
51
+ message MsgStartSessionResponse {
52
+ uint64 id = 1 [(gogoproto.customname) = "ID"];
53
+ }
54
+
55
+ message MsgUpdateParamsResponse {}
56
+
57
+ service MsgService {
58
+ rpc MsgRegisterNode(MsgRegisterNodeRequest) returns (MsgRegisterNodeResponse);
59
+ rpc MsgUpdateNodeDetails(MsgUpdateNodeDetailsRequest) returns (MsgUpdateNodeDetailsResponse);
60
+ rpc MsgUpdateNodeStatus(MsgUpdateNodeStatusRequest) returns (MsgUpdateNodeStatusResponse);
61
+ rpc MsgStartSession(MsgStartSessionRequest) returns (MsgStartSessionResponse);
62
+ rpc MsgUpdateParams(MsgUpdateParamsRequest) returns (MsgUpdateParamsResponse);
63
+ }
@@ -0,0 +1,27 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "google/protobuf/timestamp.proto";
6
+ import "sentinel/types/v1/price.proto";
7
+ import "sentinel/types/v1/status.proto";
8
+
9
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
10
+ option (gogoproto.equal_all) = false;
11
+ option (gogoproto.goproto_getters_all) = false;
12
+
13
+ message Node {
14
+ string address = 1;
15
+ repeated sentinel.types.v1.Price gigabyte_prices = 2 [(gogoproto.nullable) = false];
16
+ repeated sentinel.types.v1.Price hourly_prices = 3 [(gogoproto.nullable) = false];
17
+ repeated string remote_addrs = 4;
18
+ google.protobuf.Timestamp inactive_at = 5 [
19
+ (gogoproto.nullable) = false,
20
+ (gogoproto.stdtime) = true
21
+ ];
22
+ sentinel.types.v1.Status status = 6;
23
+ google.protobuf.Timestamp status_at = 7 [
24
+ (gogoproto.nullable) = false,
25
+ (gogoproto.stdtime) = true
26
+ ];
27
+ }
@@ -0,0 +1,21 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "cosmos/base/v1beta1/coin.proto";
5
+ import "gogoproto/gogo.proto";
6
+ import "google/protobuf/duration.proto";
7
+ import "sentinel/types/v1/price.proto";
8
+
9
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
10
+ option (gogoproto.equal_all) = false;
11
+ option (gogoproto.goproto_getters_all) = false;
12
+
13
+ message Params {
14
+ cosmos.base.v1beta1.Coin deposit = 1 [(gogoproto.nullable) = false];
15
+ repeated sentinel.types.v1.Price min_gigabyte_prices = 2 [(gogoproto.nullable) = false];
16
+ repeated sentinel.types.v1.Price min_hourly_prices = 3 [(gogoproto.nullable) = false];
17
+ google.protobuf.Duration status_timeout = 4 [
18
+ (gogoproto.nullable) = false,
19
+ (gogoproto.stdduration) = true
20
+ ];
21
+ }
@@ -0,0 +1,63 @@
1
+ syntax = "proto3";
2
+ package sentinel.node.v3;
3
+
4
+ import "cosmos/base/query/v1beta1/pagination.proto";
5
+ import "gogoproto/gogo.proto";
6
+ import "google/api/annotations.proto";
7
+ import "sentinel/node/v3/node.proto";
8
+ import "sentinel/node/v3/params.proto";
9
+ import "sentinel/types/v1/status.proto";
10
+
11
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/node/types/v3";
12
+ option (gogoproto.equal_all) = false;
13
+ option (gogoproto.goproto_getters_all) = false;
14
+
15
+ message QueryNodesRequest {
16
+ sentinel.types.v1.Status status = 1;
17
+ cosmos.base.query.v1beta1.PageRequest pagination = 2;
18
+ }
19
+
20
+ message QueryNodesForPlanRequest {
21
+ uint64 id = 1;
22
+ sentinel.types.v1.Status status = 2;
23
+ cosmos.base.query.v1beta1.PageRequest pagination = 3;
24
+ }
25
+
26
+ message QueryNodeRequest {
27
+ string address = 1;
28
+ }
29
+
30
+ message QueryNodesResponse {
31
+ repeated Node nodes = 1 [(gogoproto.nullable) = false];
32
+ cosmos.base.query.v1beta1.PageResponse pagination = 2;
33
+ }
34
+
35
+ message QueryNodesForPlanResponse {
36
+ repeated Node nodes = 1 [(gogoproto.nullable) = false];
37
+ cosmos.base.query.v1beta1.PageResponse pagination = 2;
38
+ }
39
+
40
+ message QueryNodeResponse {
41
+ Node node = 1 [(gogoproto.nullable) = false];
42
+ }
43
+
44
+ message QueryParamsRequest {}
45
+
46
+ message QueryParamsResponse {
47
+ Params params = 1 [(gogoproto.nullable) = false];
48
+ }
49
+
50
+ service QueryService {
51
+ rpc QueryNodes(QueryNodesRequest) returns (QueryNodesResponse) {
52
+ option (google.api.http).get = "/sentinel/node/v3/nodes";
53
+ }
54
+ rpc QueryNodesForPlan(QueryNodesForPlanRequest) returns (QueryNodesForPlanResponse) {
55
+ option (google.api.http).get = "/sentinel/node/v3/plans/{id}/nodes";
56
+ }
57
+ rpc QueryNode(QueryNodeRequest) returns (QueryNodeResponse) {
58
+ option (google.api.http).get = "/sentinel/node/v3/nodes/{address}";
59
+ }
60
+ rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) {
61
+ option (google.api.http).get = "/sentinel/node/v3/params";
62
+ }
63
+ }
@@ -0,0 +1,41 @@
1
+ syntax = "proto3";
2
+ package sentinel.plan.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+
6
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/plan/types/v3";
7
+ option (gogoproto.equal_all) = false;
8
+ option (gogoproto.goproto_getters_all) = false;
9
+
10
+ message EventCreate {
11
+ uint64 plan_id = 1 [(gogoproto.customname) = "PlanID"];
12
+ string prov_address = 2;
13
+ string bytes = 3;
14
+ string duration = 4;
15
+ string prices = 5;
16
+ bool private = 6;
17
+ }
18
+
19
+ message EventLinkNode {
20
+ uint64 plan_id = 1 [(gogoproto.customname) = "PlanID"];
21
+ string prov_address = 2;
22
+ string node_address = 3;
23
+ }
24
+
25
+ message EventUnlinkNode {
26
+ uint64 plan_id = 1 [(gogoproto.customname) = "PlanID"];
27
+ string prov_address = 2;
28
+ string node_address = 3;
29
+ }
30
+
31
+ message EventUpdateDetails {
32
+ uint64 plan_id = 1 [(gogoproto.customname) = "PlanID"];
33
+ string prov_address = 2;
34
+ bool private = 3;
35
+ }
36
+
37
+ message EventUpdateStatus {
38
+ uint64 plan_id = 1 [(gogoproto.customname) = "PlanID"];
39
+ string prov_address = 2;
40
+ string status = 3;
41
+ }
@@ -0,0 +1,21 @@
1
+ syntax = "proto3";
2
+ package sentinel.plan.v3;
3
+
4
+ import "gogoproto/gogo.proto";
5
+ import "sentinel/plan/v3/plan.proto";
6
+
7
+ option go_package = "github.com/sentinel-official/sentinelhub/v13/x/plan/types/v3";
8
+ option (gogoproto.equal_all) = false;
9
+ option (gogoproto.goproto_getters_all) = false;
10
+
11
+ message GenesisPlan {
12
+ Plan plan = 1 [(gogoproto.nullable) = false];
13
+ repeated string nodes = 2;
14
+ }
15
+
16
+ message GenesisState {
17
+ repeated GenesisPlan plans = 1 [
18
+ (gogoproto.moretags) = "yaml:\"plans\"",
19
+ (gogoproto.nullable) = false
20
+ ];
21
+ }